home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Risc World 3
/
Risc World 3.iso
/
SOFTWARE
/
ISSUE3
/
SCRIBBLE
/
Examples
/
arthur
next >
Wrap
Text File
|
2002-09-06
|
2KB
|
62 lines
verse1 = {
"When good king Arthur ruled the land",
"he was a goodly king.",
"He stole three pecks of barley rye",
"to make a bag pudding."
}
verse2 = {
"A bag pudding the king did make",
"and stuffed it full of plums,",
"and in it put great lumps of fat",
"as big as my two thumbs."
}
verse3 = {
"The king and queen did eat thereof",
"and noblemen beside,",
"and what they could not eat that night",
"the queen next morning fried."
}
x = BEGIN(arg[1].."/pdf")
x.red = function (self)
return self:setcolor("both","rgb",1,0,0,0)
end -- function
x.green = function (self)
return self:setcolor("both","rgb",0,1,0,0)
end -- function
x.blue = function (self)
return self:setcolor("both","rgb",0,0,1,0)
end -- function
x.showlines = function (self,t)
self:show("")
for i = 1,getn(t) do
self:continue_text(t[i])
end -- for
end -- function
x:begin_page(A4.width,A4.height)
icon = x:open_image_file("png",arg[1].."/png","",0)
x:place_image(icon,30,350,1)
x:close_image(icon)
font = x:findfont("Times-Roman", "host", 0)
x:setfont(font, 14)
x:set_text_pos(300, 700)
x:red()
x:showlines(verse1)
x:green()
x:continue_text(" ")
x:showlines(verse2)
x:blue()
x:continue_text(" ")
x:showlines(verse3)
x:END()